<template>
	<view class="zone">

		<u-navbar :is-back="false" :height="60" :background="background" :border-bottom="false">
			<view class="slot-wrap">
				<view class="nav-bar2">
					<u-icon class="back" size="20px" color="#fff" @click="$p.back()" name="arrow-left"></u-icon>
					<view class="n_left">
						 <image src="http://img.cpgm.cc/panda/static/steragy/title.png" mode="widthFix" /> 
					</view>
				</view>
			</view>
		</u-navbar>

		<view class="main">
			<!-- tab部分 -->
			<view class="tab">
				<view v-for="(item,index) in tablist" :key="index" :class="[stat == item.id?'active':'']"
					@click="tabchange(item.id)">{{item.name}}</view>
			</view>

			<view class="imgbox">
				<image v-show="stat == 1" src="http://img.cpgm.cc/panda/static/steragy/b1.png" mode="widthFix" />
				<image v-show="stat == 2" src="http://img.cpgm.cc/panda/static/steragy/b22.png" mode="widthFix" />
				<image v-show="stat == 3" src="http://img.cpgm.cc/panda/static/steragy/b3.png" mode="widthFix" />
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: {
					backgroundColor: '#000',
				},
				tablist: [{
						id: 1,
						name: '新人攻略'
					},
					{
						id: 2,
						name: '搬砖攻略'
					},
					{
						id: 3,
						name: '魂环价格'
					},
				],
				stat: 1,
			};
		},
		methods: {
			// 我的背包切换
			tabchange(id) {
				this.stat = id
			},

		},
	}
</script>

<style lang="less">

.zone {
	background: #000;
	min-height: 100vh;
}

.nav-bar2 {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 60px;
		padding: 0px 10px;
	}

	.n_left {
		width: 100%;
		display: flex;
		align-items: flex-end;
		text {
			color: rgba(255, 255, 255, 0.8);
			font-size: 12px;
			margin-left: 5px;
			margin-bottom: 10px;
		}
		image {
				width: 40%;
				margin-left: 5px;
			}
	}

	.shouxu {
		color: #fff;
		font-size: 14px;
	}

.main {
	padding: 10px;
}

// tab导航
	.tab {
		width: 100%;
		display: flex;
		align-items: center;
		background: #E9E9E9 linear-gradient(180deg, #FFE6E0 0%, #FFFFFF 100%);
		box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.1);
		border-radius: 5px;
		padding: 5px;
		overflow: hidden;
		margin: 10px auto;
		border-radius: 7px;
		// backdrop-filter: blur(50px);

		view {
			width: 50%;
			height: 42px;
			text-align: center;
			line-height: 42px;
			color: #343434;
			font-size: 13px;
			font-weight: 600;
			border-radius: 7px;
		}
	}
	.active {
		color: #FFFFFF !important;
		background: #000000 !important;
	}

	.imgbox {
		width: 100%;

		image {
			width: 100%;
		}
	}

</style>
